package com.zhuge_new.Adapter;

import android.app.Activity;
import android.content.Context;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zhuge_new.Activity.GatheringAcivity;
import com.zhuge_new.R;
import com.zhuge_new.bean.GatheringBean;
import com.zhuge_new.untils.NumberUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018/11/13.
 */

public class GatheringAdapter extends BaseQuickAdapter<GatheringBean.ObjectBean.ReceivesBean,BaseViewHolder> {

    private Context context;
    private List<GatheringBean.ObjectBean.ReceivesBean> data=new ArrayList<>();
    public GatheringAdapter(Context context, @Nullable List<GatheringBean.ObjectBean.ReceivesBean> data) {
        super(R.layout.item_mindeposit, data);
        this.context=context;
        this.data=data;
    }

    @Override
    protected void convert(BaseViewHolder helper, GatheringBean.ObjectBean.ReceivesBean item) {
        TextView mindeposit_rate=helper.getView(R.id.mindeposit_rate);
        mindeposit_rate.setVisibility(View.VISIBLE);
        helper.setText(R.id.mindeposit_name,item.getBank()+"(尾号"+item.getCreditcardSuf()+")");
        mindeposit_rate.setText("费率["+NumberUtil.main(item.getRate())+"]");
        helper.setText(R.id.mindeposit_time,item.getCreateDate());
        helper.setText(R.id.mindeposit_money,item.getAmount()+"元");
        helper.setText(R.id.mindeposit_state,item.getStatus());
    }
}
